package com.jbm.jbmsupplier.zp.interfaces;

import android.database.sqlite.SQLiteDatabase;

import com.jbm.jbmsupplier.zp.entity.Buddy_ListData;
import com.jbm.jbmsupplier.zp.entity.ChatMsgEntity;
import com.jbm.jbmsupplier.zp.entity.Recent_ContactsData;

import java.util.ArrayList;

/**
 * Created by 家帮忙 on 2017/7/19.
 */

public interface SqlistInterface {

  void createGroadTable(SQLiteDatabase db,String tableName);//聊天表
    void crateGroad(SQLiteDatabase db,String tableName);//创建组表
    void insertGroadtable(SQLiteDatabase db, String tableName, String name,String head_portrait,String time,String msg,int unreadmsg,int cgid,int tag,int toid);//添加群组
  ArrayList<Recent_ContactsData> showGroad(SQLiteDatabase db, String tableName, int cgid);//查找所有的组
    void insertGroadTable(SQLiteDatabase db, String tableName, String name , String head_portrait , String  date , String  texts, String  time , int to_id , int local_id ,int orderid,double amount,String sedname ,String Route,String MediaName ,String AudioTime ,int UnreadMsg ,String address ,String photo , int flag , int cgid, int tags,String isboo,int login);//添加聊天数据
    ArrayList<ChatMsgEntity> showGroadTable(SQLiteDatabase db, String tableName, int cgid,int login);//查找聊天数据
     Recent_ContactsData showGroadTableid(SQLiteDatabase db, String tableName,int cgid);//查找组表里的姓名
  void setdelete(SQLiteDatabase db,String tableName,int cgid,int loginid);//删除每一个群
  int SelectUnreadmsg(SQLiteDatabase db, String tableName,int cgid);//根据cgid  查找位读消息
  void UpdateReadmsg(SQLiteDatabase db, String tableName,int cgid);//更新未读消息
  void UpdateErrorMsg(SQLiteDatabase db, String tableName,String isboolean,int cgid,String data,int login);//根据群id来更新发送成功或失败
//添加好友
 void  StoringBuddydata(SQLiteDatabase db,String tableName, int m_account_id,String nickname,String account,String mobile,String remark,String head_portrait,String autograph,String region,String Circle_friends,int isfriends,int loginid);
  //保存聊天记录
 void StoringChatData(SQLiteDatabase db,String tableName, int to_id,String myhead_portrait, String text, String Date, String Name,String Route,String MediaName,String AudioTime,String payDate,String payMoney,String payMode,String payState,String code,String memo, int flag, int UnreadMsg,String isboolean,int loginid) ;
//保存最近联系人
void StoringRecentID(SQLiteDatabase db,String tableName, int contactsID,int login,String date);
  //根据登录id来查找这个人在不在联系列表
  ArrayList<String> showaRecentContactsid(SQLiteDatabase db,String tableName,int toid,int loginin);
  //根据登录id查找所有的最近联系人
  ArrayList<String> showaRecentContactsids(SQLiteDatabase db,String tableName,int login);
//查找最后一条消息在联系人页面
ArrayList<Recent_ContactsData> showRecentContactslast(SQLiteDatabase db,String tableName,int loginid,int toid);
  //查找聊天数据
  ArrayList<ChatMsgEntity> showChatData(SQLiteDatabase db,String tableName,int loginid,int toid);

//查找所有好友
ArrayList<Buddy_ListData> showdata(SQLiteDatabase db,String tableName, int loginid);
//查找个人信息
Buddy_ListData showFriendsToID(SQLiteDatabase db,String tableName,int m_account_id,int loginid);





}
